<?php
/**
 * Created by JetBrains PhpStorm.
 * User: liulong
 * Date: 13-12-18
 * Time: 下午10:49
 * To change this template use File | Settings | File Templates.
 */

class WxController extends CoreController
{
    protected function beforeAction($action) {
        $assets = Yii::getPathOfAlias('webroot').DIRECTORY_SEPARATOR.'statics'.DIRECTORY_SEPARATOR;
        //在asset中建立一个不冲突文件夹 用来存放JS IMG 以及 CSS  2014 03 10
        $this->staticsPath = Yii::app()->assetManager->publish($assets);

        return true;
    }
    /**
     * 注册程序需要的资源
     */
    private function registerAssets()
    {

        $am = Yii::app()->assetManager;
        $app_path = Yii::getPathOfAlias('application');
        $this->_assetsUrl = $am->publish($app_path . '/packages');

        return $this->_assetsUrl;
    }

}